#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 数据模型
from app import db
from flask.ext.wtf import Form
from wtforms import StringField
from wtforms.validators import DataRequired


class Todo(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    content = db.Column(db.String(60))
    time = db.Column(db.DateTime)
    status = db.Column(db.Integer)

    def __repr__(self):
        return '<Todo %r>' % (self.id)


class TodoForm(Form):
    content = StringField('content', validators=[DataRequired()])
